<%@ page contentType="text/html; charset=utf-8"%>
<%@ include file="/jsp/inc/header.jsp" %>
<c:set var="title" value="任务"/>
<c:set var="rootpath" value="${CONTEXT_PATH}/site/generalTemplet"/>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link href="${STATIC_HOST}/css/ligerui.css" rel="stylesheet" type="text/css"/>
    <link href="${STATIC_HOST}/css/common.css" rel="stylesheet" type="text/css" />
    <script src="${STATIC_HOST}/js/common.js" type="text/javascript"></script>
    <script src="${STATIC_HOST}/js/LG.js" type="text/javascript"></script>
<title>配置${title}</title>
</head>
<body>
<form:form commandName="task" class="l-form" id="mainform" name="mainform" method="post" action="${rootpath}/${task.id==0 ? 'save' : 'update'}.do">
  	<ul>
      <li class="li_show_left" style="padding-left:30px;"><label for="siteFileId">通用模板</label> <span style="color:red">*</span>:</li>
           <li class="li_show_right">
		      <select name="siteFileId" id="siteFileId" ltype="select" size="1" ligerui='{"width":160}'>
	          	<c:forEach var="obj" items="${generalIdMap}" varStatus="idx">
	          	<option value="${obj.key}">${obj.value}</option>
		   	  </c:forEach>
		   </select>
      </li>   
    </ul>
    <ul>
      <li class="li_show_left" style="padding-left:30px;"><label for="picurl">专题头图</label> <span style="color:red">*</span>:</li>
           <li class="li_show_right">
        <input type="text" name="picurl" id="picurl" size="60" maxlength="128" ltype='text'  validate="{required:true,minlength:0,maxlength:100}"/>
      </li> 
    </ul>
    <!-- 换行 -->
    <ul>
      <li class="li_show_left" style="padding-left:30px;"><label for="left_1_id">左一（1）</label> <span style="color:red">*</span>:</li>
           <li class="li_show_right">
        <input type="text" name="left_1_id" id="left_1_id" size="10" maxlength="10" ltype='text' ligerui="{type:'int',width:160}"  validate="{required:true,digits:true,minlength:0,maxlength:10}"/>
      </li> 
       <li class="li_show_right">
      	<select id="left_1_rc">
      		<option selected="selected" value="1">区块</option>
      		<option value="2">栏目</option>
      	</select>
      </li>
    </ul>
    <!-- 换行 -->
    <ul>
      <li class="li_show_left" style="padding-left:30px;"><label for="right_1_id">右一（2）</label> <span style="color:red">*</span>:</li>
           <li class="li_show_right">
        <input type="text" name="right_1_id" id="right_1_id" size="10" maxlength="10" ltype='text' ligerui="{type:'int',width:160}"  validate="{required:true,digits:true,minlength:0,maxlength:10}"/>
      </li> 
      <li class="li_show_right">
      	<select id="right_1_rc">
      		<option selected="selected" value="1">区块</option>
      		<option value="2">栏目</option>
      	</select>
      </li>
    </ul>
    <!-- 换行 -->
    <ul>
      <li class="li_show_left" style="padding-left:30px;"><label for="left_2_id">左二（3）</label> <span style="color:red">*</span>:</li>
           <li class="li_show_right">
        <input type="text" name="left_2_id" id="left_2_id" size="10" maxlength="10" ltype='text' ligerui="{type:'int',width:160}"  validate="{required:true,digits:true,minlength:0,maxlength:10}"/>
      </li> 
       <li class="li_show_right">
      	<select id="left_2_rc">
      		<option selected="selected" value="1">区块</option>
      		<option value="2">栏目</option>
      	</select>
      </li>
    </ul>
    <!-- 换行 -->
    <ul>
      <li class="li_show_left" style="padding-left:30px;"><label for="right_2_id">右二（4）</label> <span style="color:red">*</span>:</li>
           <li class="li_show_right">
        <input type="text" name="right_2_id" id="right_2_id" size="10" maxlength="10" ltype='text' ligerui="{type:'int',width:160}"  validate="{required:true,digits:true,minlength:0,maxlength:10}"/>
      </li> 
      <li class="li_show_right">
      	<select id="right_2_rc">
      		<option selected="selected" value="1">区块</option>
      		<option value="2">栏目</option>
      	</select>
      </li>
    </ul>
    <!-- 换行 -->

  <div class="l-group l-group-hasicon"></div> 
  <input type="button" value="生成" id="mainformsubmit" class="l-button l-button-submit form_submit_button"/> 
</form:form>
<script type="text/javascript" >
var mainform = $("#mainform");
mainform.ligerForm();

jQuery("#mainformsubmit").click(function(){
	var right_1_rc = $("#right_1_rc").val();
	var right_2_rc = $("#right_2_rc").val();
	var left_1_rc = $("#left_1_rc").val();
	var left_2_rc = $("#left_2_rc").val();
	
	var right_1_id = $("#right_1_id").val();
	var right_2_id = $("#right_2_id").val();
	var left_1_id = $("#left_1_id").val();
	var left_2_id = $("#left_2_id").val();
	
	var siteFileId = $("#siteFileId").val();
	var picurl = $("#picurl").val();
	parent.window.formatC(right_1_rc,right_2_rc,left_1_rc,left_2_rc,right_1_id,right_2_id,left_1_id,left_2_id,siteFileId,picurl);
});
</script>
<div id="scrolltop">返回顶部</div>
</body>
</html>